package com.aboat.action;

import com.aboat.view.WindowFrame;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * 暂停
 *
 * @author aboat
 * @email clear_windy@yeah.net
 * @create 2017-04-16 22:21
 */
public class PauseListener implements ActionListener {
    @Override
    public void actionPerformed(ActionEvent e) {
        while(WindowFrame.crawler.isResumable()){
            WindowFrame.crawler.stop();
            WindowFrame.crawler.setResumable(false);
        }
        WindowFrame.actionButton.setEnabled(true);
    }
}
